Skip to content

feat(agent): add quickForm escalation tool#876

Merged
cotovanu-cristian merged 1 commit into
mainfrom
feat/quick-form-escalation-tool
Jun 9, 2026
Merged

feat(agent): add quickForm escalation tool#876
cotovanu-cristian merged 1 commit into
mainfrom
feat/quick-form-escalation-tool

Conversation

@cotovanu-cristian

@cotovanu-cristian cotovanu-cristian commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds support for QuickForm escalation channels (type: actionCenterQuickForm) to the low-code agent escalation tool. A QuickForm channel renders a schema-first FormLib task inline (no deployed Action Center app), while Action Center channels keep dispatching to their app task. The two variants are modeled as the upstream discriminated union EscalationChannel = AgentEscalationChannel | AgentQuickFormEscalationChannel and flow through the existing create_escalation_tool — no separate tool or factory branch. Channel configuration is validated up front at tool construction so malformed escalations fail fast at agent startup rather than mid-run.

Changes

  • escalation_tool.py
    • create_escalation_tool consumes channel: EscalationChannel and handles both variants.
    • New module-level create_task_for_channel(client, channel, *, title, data, recipient, folder_path) -> Task concentrates per-channel dispatch: QuickForm → tasks.create_quickform_async(task_schema_key=schema_id, schema=form_schema, …); Action Center → tasks.create_async(app_name=…, …).
    • _resolve_channel(resource) resolves the channel and validates configuration at construction — a QuickForm channel missing its schema_id raises AgentStartupError(INVALID_TOOL_CONFIG) (previously a runtime AgentRuntimeError).
    • _try_get_channel_app_name(channel) derives app_name (Action Center → its app name; QuickForm → None), used for both WaitEscalation.app_name and the tool's display_name metadata (falls back to channel.name).
    • Form body is read via channel.properties.form_schema (the field; "schema" is its serialization alias) and the id via the schema_id property.
  • ixp_escalation_tool.py
    • _resolve_action_center_channel(resource) validates that a VS escalation uses an Action Center channel, rejecting QuickForm with AgentStartupError(INVALID_TOOL_CONFIG). The narrowed type lets display_name read channel.properties.app_name directly (no lossy helper).
  • pyproject.toml / uv.lock — bump uipath 2.10.742.10.79 (ships the EscalationChannel union, AgentQuickFormChannelProperties, and TasksService.create_quickform_async); package version 0.11.130.11.14.
  • Tests
    • test_escalation_tool.pyTestQuickFormEscalation (dispatch to create_quickform_async, app_name=None in WaitEscalation, outcome-mapping END termination, tool metadata, Action-Center-does-not-dispatch-to-QuickForm) + construction-time missing-schema_id validation.
    • test_ixp_escalation_tool.pydisplay_name is the channel app name + VS escalation rejects a QuickForm channel at construction.
    • test_tool_factory.py — a QuickForm resource routes through the existing AgentEscalationResourceConfig path (no new factory branch).

Flow

flowchart TD
    A[create_escalation_tool] --> B[_resolve_channel]
    B -->|QuickForm without schemaId| E[AgentStartupError INVALID_TOOL_CONFIG]
    B -->|valid channel| C[tool invoked]
    C --> G[create_task_for_channel]
    G -->|actionCenterQuickForm| D[tasks.create_quickform_async]
    G -->|actionCenter| F[tasks.create_async with app_name]
Loading

Testing

  • ruff check . + httpx-client linter — pass
  • ruff format --check . — pass
  • mypy on changed files — clean (remaining errors are pre-existing optional boto3/vertex extras, resolved in CI --all-extras)
  • pytest tests/agent/ — 1177 passed
  • Unit tests added/updated (QuickForm dispatch, construction-time validation, factory routing, IXP channel guard)
  • Type-safe — no # type: ignore / suppressions added

Breaking changes

None — additive. QuickForm is a new channel variant; existing Action Center escalation behavior is unchanged.

@cotovanu-cristian cotovanu-cristian force-pushed the feat/quick-form-escalation-tool branch from d9afdce to 56cabe0 Compare May 27, 2026 16:50
@cotovanu-cristian cotovanu-cristian changed the title feat(agent): QuickForm escalation tool + escalation subpackage refactor feat(agent/tools): QuickForm escalation tool (escalationType=2) May 27, 2026
@cotovanu-cristian cotovanu-cristian force-pushed the feat/quick-form-escalation-tool branch 2 times, most recently from 2b82871 to 2cf2c9e Compare June 8, 2026 15:22
@cotovanu-cristian cotovanu-cristian changed the title feat(agent/tools): QuickForm escalation tool (escalationType=2) feat(agent/tools): QuickForm escalation tool Jun 8, 2026
@cotovanu-cristian cotovanu-cristian force-pushed the feat/quick-form-escalation-tool branch from 3d5029c to 0b0c499 Compare June 9, 2026 06:54
@cotovanu-cristian cotovanu-cristian changed the title feat(agent/tools): QuickForm escalation tool feat(agent): add quickForm escalation tool Jun 9, 2026
@cotovanu-cristian cotovanu-cristian marked this pull request as ready for review June 9, 2026 07:24
Copilot AI review requested due to automatic review settings June 9, 2026 07:24
@cotovanu-cristian cotovanu-cristian force-pushed the feat/quick-form-escalation-tool branch from 0b0c499 to d6a4354 Compare June 9, 2026 07:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for QuickForm escalation channels (type: actionCenterQuickForm) in the low-code agent escalation tool by routing task creation through a single per-channel dispatch helper, while keeping existing Action Center escalation behavior intact. This extends the agent tools layer to support schema-first inline forms without introducing a new tool/factory branch.

Changes:

  • Extend create_escalation_tool to accept the upstream EscalationChannel union and dispatch task creation via new create_task_for_channel() (QuickForm → create_quickform_async, Action Center → create_async).
  • Adjust tool metadata/display name behavior to handle channels without an app_name (QuickForm falls back to channel name; IXP escalation now guards display_name via _channel_app_name).
  • Add comprehensive QuickForm-focused tests and bump uipath dependency/lockfile to the version that provides the new channel models + create_quickform_async.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/uipath_langchain/agent/tools/escalation_tool.py Adds union-channel handling, per-channel task dispatch, and display name fallback for QuickForm.
src/uipath_langchain/agent/tools/ixp_escalation_tool.py Uses shared channel→app_name derivation for metadata display name.
src/uipath_langchain/agent/tools/escalation_memory.py Formatting-only import/signature wrapping (no behavior change).
tests/agent/tools/test_escalation_tool.py Adds QuickForm coverage (dispatch, metadata, outcome mapping termination, schema-id validation, non-regression).
tests/agent/tools/test_tool_factory.py Ensures QuickForm resources route through the existing escalation tool factory path.
pyproject.toml Version bump to 0.11.14 and updates uipath minimum version.
uv.lock Updates resolved uipath version and lock metadata to match dependency changes.

Comment thread src/uipath_langchain/agent/tools/escalation_tool.py Outdated
Comment thread src/uipath_langchain/agent/tools/ixp_escalation_tool.py Outdated
@cotovanu-cristian cotovanu-cristian force-pushed the feat/quick-form-escalation-tool branch from d6a4354 to 3b5e880 Compare June 9, 2026 11:12
@cotovanu-cristian cotovanu-cristian enabled auto-merge (squash) June 9, 2026 11:12
@cotovanu-cristian cotovanu-cristian merged commit 455b547 into main Jun 9, 2026
47 checks passed
@cotovanu-cristian cotovanu-cristian deleted the feat/quick-form-escalation-tool branch June 9, 2026 11:16
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants